apiready = function() {
	$api.getServerUrl(function(serverUrl) {
		//获取首页广告
		$api.do_get('/api/home/adv', function(result) {
			result.forEach(function(item) {
				item.img = serverUrl + item.img;
			});
			$api.crateDom("_homeAd.html", result, function(resultHtml) {
				document.getElementById('homeAd').innerHTML = resultHtml;
				TouchSlide({
					slideCell: "#slideBox",
					titCell: ".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
					mainCell: ".bd ul",
					effect: "leftLoop",
					autoPage: true, //自动分页
					autoPlay: true //自动播放
				});
			});
		});

	});




	$api.getServerUrl(function(serverUrl) {
			$api.do_get('/api/home/fl', function(result) {
					var html = '';
					if (result.length < 1) {
						html = '<div ><span>暂无福利信息...</span></div>';
						return;
					}

						for (var item= 0; item < result.length; item++) {
						html += '<div class="goods_title">72福利</div>  <ul class="goods_list" id="fl"> <li><a onclick="adOpenWin(' + result[item].link + ',' + serverUrl + result[item].link + ')" class="pic"><img src="' + serverUrl + result[item].img + '" /></a></li></ul>';
					}
					$(".goods_item").html(html);


				
			});
	});




};

function adOpenWin(winName, winUrl) {
	
	$api.mOpenWin(winName, winUrl);
}